			var fyKinds = "";
			var fyGq =  "";
			var keyWord =  "";
		//加载数据
		$(function() {
			var fyKinds = $("#fyKinds").val();
			var fyGq = $("#fyGq").val();
			var keyWord = $("#keyWord").val();
			console.log($("#keyWord").html());
			//标题
			$("#title").html("搜索："+keyWord);
			
			MTools.autoFullSelect();
			var pageSize = $("#limit").val();
			Pagination
					.init({
						url : basePath+"/index/queryFy",
						pageSize : pageSize,
						builderDate : function(loj) {
							var html = "";
							if (loj.getRowCount() <= 0) {
								$("#addhas").hide();
								$("#addno").show();
								return;
							} else {
								$("#addhas").show();
								$("#addno").hide();
							}
	//========================================================================================================================						
							var html = buidData(loj);
							$("#data").append(html);
						}
					});
			addData();
		})
		
		
		var pageNow = 0;
		function addData() {
			pageNow++;
			Pagination.changePage(pageNow);
			
		}
		
		function changeSelect2() {
			$("#data").html("");
			 pageNow = 1;
			Pagination.changePage(pageNow);
		}	
		
function buidData(loj){
	var html="";

	for (var i = 0; i < loj.getRowCount(); i++) {
		
		fyKinds=loj.getString(i,"fyKinds");
		fyGq=loj.getString(i,"fyGq");
			
	if (fyKinds == '出租房'&&fyGq=='出租') {
		html+=buidczfcz(i,loj);	
	}else if(fyKinds == '出租房'&&fyGq=='求租'){
		html+=buidczfqz(i,loj);	
	}else if(fyKinds == '二手房'&&fyGq=='出售'){
		html+=buidesfcs(i,loj);	
	}else if(fyKinds == '二手房'&&fyGq=='求购'){
		html+=buidesfqg(i,loj);	
	}else if(
			(fyKinds == '写字楼'&&fyGq=='转让')||
			(fyKinds == '写字楼'&&fyGq=='出售')||
			(fyKinds == '写字楼'&&fyGq=='出租')||
			
			(fyKinds == '商铺'&&fyGq=='转让')||
			(fyKinds == '商铺'&&fyGq=='出售')||
			(fyKinds == '商铺'&&fyGq=='出租')){
		html+=buidespzr(i,loj);	
	}else if(
			(fyKinds == '写字楼'&&fyGq=='求购')||
			(fyKinds == '写字楼'&&fyGq=='求租')||
			
			(fyKinds == '商铺'&&fyGq=='求购')||
			(fyKinds == '商铺'&&fyGq=='求租')){
		html+=buidespqg(i,loj);	
	}
	
	
	
	else if(
			(fyKinds == '厂房'&&fyGq=='转让')||
			(fyKinds == '厂房'&&fyGq=='出售')||
			(fyKinds == '厂房'&&fyGq=='出租')){
		html+=buidecfzr(i,loj);	
	}else if(
			(fyKinds == '厂房'&&fyGq=='求购')||
			(fyKinds == '厂房'&&fyGq=='求租')){
		html+=buidecfqg(i,loj);	
	}
	}
	
	
	return html;
}
		
		
		
		
//出租房出租信息
function  buidczfcz(i,loj){
	var html = "";
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+loj.getString(i,"infoRoomS")+'室'+
			+loj.getString(i,"infoRoomT")+'厅'+
			+loj.getString(i,"infoRoomW")+'卫-'
			+loj.getString(i,"infoNeighbourhoodsName")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'<div class="float-r">'+
				'<span class="color-y font-w6 font-s1">'
				+loj.getString(i,"czPrice")
				+loj.getString(i,"czPriceMethod")
			+'</div>'+
			'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		


//二手房出售
function  buidesfcs(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"infoRoomS")+'室'+
		+loj.getString(i,"infoRoomT")+'厅'+
		+loj.getString(i,"infoRoomW")+'卫-'
		+loj.getString(i,"infoNeighbourhoodsName")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+loj.getString(i,"csPrice")
		+'万</div>'+
		'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		


//出租房求租信息
function  buidczfqz(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+loj.getString(i,"qzqgArea")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'</div><div class="float-r">'+
				'<span class="color-y font-w6 font-s1">'
				+loj.getString(i,"qzqgPriceMin")+'-'
				+loj.getString(i,"qzqgPriceMax")
			+'/月</div>'+
			'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		




//二手房求购
function  buidesfqg(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
			'<h3 class="am-list-item-hd">'+
			'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
			'</h3>'+
			'<div class="am-list-item-text color-9">'
			+loj.getString(i,"qzqgArea")
			+' /'+loj.getDateSimple(i,"glCreateTime")
			+'</div><div class="float-r">'+
				'<span class="color-y font-w6 font-s1">'
				+loj.getString(i,"qzqgPriceMin")+'万-'
				+loj.getString(i,"qzqgPriceMax")
			+'万</div>'+
			'</div>'+
		'	<div class="float-r">'+
		'		<span class="time color-9">'+loj.getString(i,"infoZxqk")+'</span>'+
		'	</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		











//商铺转让  出售
function  buidespzr(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		
		var price="";
		if(fyGq!='出租'){
			price=loj.getString(i,"csPrice")+"万";
		}else{
			price=loj.getString(i,"czPrice")+"/月";
		}
			
		
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"spType")
		+loj.getString(i,"infoAreaCount")+' ㎡ '
		+loj.getString(i,"qzqgArea")
		+'  /'+loj.getDateSimple(i,"glCreateTime")
		+'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		






		


//商铺求购求租
function  buidespqg(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		var price="";
		if(fyGq!='求租'){
			price=+loj.getString(i,"qzqgPriceMin")+'万 - '
			+loj.getString(i,"qzqgPriceMax")+'万';
		}else{
			price=+loj.getString(i,"qzqgPriceMin")+'-'
			+loj.getString(i,"qzqgPriceMax")+'/月';
		}
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"qzqgArea")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+'</div><div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	return html;
}	















//厂房转让  出售
function  buidecfzr(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		
		var price="";
		if(fyGq!='出租'){
			price=loj.getString(i,"csPrice")+"万";
		}else{
			price=loj.getString(i,"czPrice")+"/月";
		}
			
		
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class="am-u-sm-4 am-list-thumb">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="" > <img src="'+loj.getString(i,"fyImage")+'" /> </a>'+
		'</div>'+
		'<div class=" am-u-sm-8 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"spType")
		+loj.getString(i,"infoAreaCount")+' ㎡ '
		+loj.getString(i,"qzqgArea")
		+'  /'+loj.getDateSimple(i,"glCreateTime")
		+'<div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		

//厂房求购求租
function  buidecfqg(i,loj){
	var html = "";
		
		var top="";
		if(loj.getString(i,"glIsTop")=='是'){
			top='<img src="'+basePath+'/resource/images/d.png" />';
		}
		
		var price="";
		if(fyGq!='求租'){
			price=+loj.getString(i,"qzqgPriceMin")+'万 - '
			+loj.getString(i,"qzqgPriceMax")+'万';
		}else{
			price=+loj.getString(i,"qzqgPriceMin")+'-'
			+loj.getString(i,"qzqgPriceMax")+'/月';
		}
		
		html += '<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">'+
		'<div class=" am-u-sm-12 am-list-main">'+
		'<h3 class="am-list-item-hd">'+
		'<a href="'+basePath+'/index/queryFyMsg?id='+loj.getString(i,"id")+'" class="color-3 font-w6">'+loj.getString(i,"fyTitle")+'</a>'+top+
		'</h3>'+
		'<div class="am-list-item-text color-9">'
		+loj.getString(i,"qzqgArea")
		+' /'+loj.getDateSimple(i,"glCreateTime")
		+'</div><div class="float-r">'+
		'<span class="color-y font-w6 font-s1">'
		+price+'</div>'+
		'</div>'+
		'	</div>'+
		'	</li>';
	return html;
}		
function changeSelect(node) {
	console.log(1);
	var nvalue = $(node).val();
	if (nvalue == '') {
		return;
	}
	var bs="<option value=''>供求类型</option>";
	var cz = "<option value='出租' >出租</option>";
	var qz = "<option value='求租' >求租</option>";
	var cs = "<option value='出售' >出售</option>";
	var qg = "<option value='求购' >求购</option>";
	var zr = "<option value='转让' >转让</option>";
	var html = '';
	if (nvalue == '二手房') {
		html = bs+cs + qg;
	} else if (nvalue == '写字楼') {
		html =bs+ cs + cz + qz + qg;
	} else if (nvalue == '出租房') {
		html = bs+cz + qz;
	} else if (nvalue == '商铺') {
		html =bs+ cz + qz + cs + qg + zr;
	} else if (nvalue == '厂房') {
		html =bs+ cz + qz + cs + qg + zr;
	}
	$("#data").html("");
	$("#fyGq").html(html);
	pageNow=1;
	Pagination.changePage(pageNow);
}

